package com.kaili.basic.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.basic.pojo.entity.BaseCompany;
import com.kaili.common.entity.BaseUser;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;
import java.util.Map;


public interface BaseUserService extends UserDetailsService {

    /**
     * @param baseUser
     * @param type(1修改2重置)
     * @return
     */
    int baseUserReg(BaseUser baseUser, int type);

    int baseUserReg2(BaseUser baseUser);

    int addUser(BaseUser user);

    Page<BaseUser> getBaseUsersByKeywords(Page<BaseUser> page, BaseUser baseUser);

    int updateBaseUser(BaseUser baseUser);

    int updateBaseUserBaseRoles(Long baseUserId, Long[] rids);

    BaseUser getBaseUserById(Long baseUserId);

    int deleteBaseUser(Long baseUserId);

    List<BaseUser> selectBaseUserByMap(Map search);

    Integer selectCountAccount();

    BaseCompany selectMapCompany(String id);

    Integer getBaseUsersByEmployeeId(int employeeId);

    //解除锁定
    void relieveUnlock(String name);


    //往redis 存入数据
    Integer saveTranslate(String username, Integer translate);

}
